﻿// See https://aka.ms/new-console-template for more information
using SMSDemo;
using System.Xml;

Console.WriteLine("Hello, World!");
IDictionary<string, string> templateParam = new Dictionary<string, string>();
templateParam.Add("code", "");
templateParam.Add("time", DateTime.Now.ToString());
var sms = new SMSEntity
{
    PhoneNumbers = "13000000000",
    SignName = "您的签名",
    TemplateCode = "您的模板代码",
    TemplateParam = templateParam
};
SMSUtil smsUtil = new SMSUtil();
smsUtil.AccessKeyId = "您的AccessKeyId";
smsUtil.AccessKeySecret = "您的AccessKeySecret";
var result = smsUtil.Send(sms).Result;
string rema = string.Format("发送结果:{0}\r\n返回信息:{1}", result.success, result.response);
Console.WriteLine(rema);
Console.ReadKey();